﻿/*
 * KLF Headless Browser
 * Written by Kris Oye <kristianoye@gmail.com>
 * Copyright (C) 2011-2012.  All rights reserved.
 */
namespace KLF.Lib.Browser.DOM.CSS2
{
    #region Using Statements

    using System;
    using System.Collections.Generic;

    #endregion

    /// <summary>
    /// The CSS2Properties interface represents a convenience mechanism for 
    /// retrieving and setting properties within a CSSStyleDeclaration. The 
    /// attributes of this interface correspond to all the properties specified 
    /// in CSS2. Getting an attribute of this interface is equivalent to 
    /// calling the getPropertyValue method of the CSSStyleDeclaration 
    /// interface. Setting an attribute of this interface is equivalent to 
    /// calling the setProperty method of the CSSStyleDeclaration interface.
    /// 
    /// A conformant implementation of the CSS module is not required to 
    /// implement the CSS2Properties interface. If an implementation does 
    /// implement this interface, the expectation is that language-specific 
    /// methods can be used to cast from an instance of the CSSStyleDeclaration
    /// interface to the CSS2Properties interface.
    /// 
    /// If an implementation does implement this interface, it is expected to
    /// understand the specific syntax of the shorthand properties, and apply
    /// their semantics; when the margin property is set, for example, the
    /// marginTop, marginRight, marginBottom and marginLeft properties are 
    /// actually being set by the underlying implementation.
    /// 
    /// When dealing with CSS "shorthand" properties, the shorthand properties 
    /// should be decomposed into their component longhand properties as 
    /// appropriate, and when querying for their value, the form returned 
    /// should be the shortest form exactly equivalent to the declarations
    /// made in the ruleset. However, if there is no shorthand declaration that
    /// could be added to the ruleset without changing in any way the rules 
    /// already declared in the ruleset (i.e., by adding longhand rules that 
    /// were previously not declared in the ruleset), then the empty string 
    /// should be returned for the shorthand property.
    /// 
    /// For example, querying for the font property should not return "normal 
    /// normal normal 14pt/normal Arial, sans-serif", when "14pt Arial, 
    /// sans-serif" suffices. (The normals are initial values, and are implied
    /// by use of the longhand property.)
    /// 
    /// If the values for all the longhand properties that compose a particular
    /// string are the initial values, then a string consisting of all the 
    /// initial values should be returned (e.g. a border-width value of "medium" 
    /// should be returned as such, not as "").
    /// 
    /// For some shorthand properties that take missing values from other sides,
    /// such as the margin, padding, and border-[width|style|color] properties,
    /// the minimum number of sides possible should be used; i.e., "0px 10px" 
    /// will be returned instead of "0px 10px 0px 10px".
    /// 
    /// If the value of a shorthand property can not be decomposed into its 
    /// component longhand properties, as is the case for the font property 
    /// with a value of "menu", querying for the values of the component 
    /// longhand properties should return the empty string.
    /// </summary>
    public class CSS2Properties
    {
        #region Constants

        public const string CSS2_AZIMUTH = "azimuth";
        public const string CSS2_BACKGROUND = "background";
        public const string CSS2_BACKGROUND_ATTACHMENT = "background-attachment";
        public const string CSS2_BACKGROUND_COLOR = "background-color";
        public const string CSS2_BACKGROUND_IMAGE = "background-image";
        public const string CSS2_BACKGROUND_POSITION = "background-position";
        public const string CSS2_BACKGROUND_REPEAT = "background-repeat";
        public const string CSS2_BORDER = "border";
        public const string CSS2_BORDER_COLLAPSE = "border-collapse";
        public const string CSS2_BORDER_COLOR = "border-color";
        public const string CSS2_BORDER_SPACING = "border-spacing";
        public const string CSS2_BORDER_STYLE = "border-style";
        public const string CSS2_BORDER_TOP = "border-top";
        public const string CSS2_BORDER_RIGHT = "border-right";
        public const string CSS2_BORDER_BOTTOM = "border-bottom";
        public const string CSS2_BORDER_LEFT = "border-left";
        public const string CSS2_BORDER_TOP_COLOR = "border-top-color";
        public const string CSS2_BORDER_RIGHT_COLOR = "border-right-color";
        public const string CSS2_BORDER_BOTTOM_COLOR = "border-bottom-color";
        public const string CSS2_BORDER_LEFT_COLOR = "border-left-color";
        public const string CSS2_BORDER_TOP_STYLE = "border-top-style";
        public const string CSS2_BORDER_RIGHT_STYLE = "border-right-style";
        public const string CSS2_BORDER_BOTTOM_STYLE = "border-bottom-style";
        public const string CSS2_BORDER_LEFT_STYLE = "border-left-style";
        public const string CSS2_BORDER_TOP_WIDTH = "border-top-width";
        public const string CSS2_BORDER_RIGHT_WIDTH = "border-right-width";
        public const string CSS2_BORDER_BOTTOM_WIDTH = "border-bottom-width";
        public const string CSS2_BORDER_LEFT_WIDTH = "border-left-width";
        public const string CSS2_BORDER_WIDTH = "border-width";
        public const string CSS2_BOTTOM = "bottom";
        public const string CSS2_CAPTION_SIDE = "caption-side";
        public const string CSS2_CLEAR = "clear";
        public const string CSS2_CLIP = "clip";
        public const string CSS2_COLOR = "color";
        public const string CSS2_CONTENT = "content";
        public const string CSS2_COUNTER_INCREMENT = "counter-increment";
        public const string CSS2_COUNTER_RESET = "counter-reset";
        public const string CSS2_CUE = "cue";
        public const string CSS2_CUE_AFTER = "cue-after";
        public const string CSS2_CUE_BEFORE = "cue-before";
        public const string CSS2_CURSOR = "cursor";
        public const string CSS2_DIRECTION = "direction";
        public const string CSS2_DISPLAY = "display";
        public const string CSS2_ELEVATION = "elevation";
        public const string CSS2_EMPTY_CELLS = "empty-cells";
        public const string CSS2_CSS_FLOAT = "css-float";
        public const string CSS2_FONT = "font";
        public const string CSS2_FONT_FAMILY = "font-family";
        public const string CSS2_FONT_SIZE = "font-size";
        public const string CSS2_FONT_SIZE_ADJUST = "font-size-adjust";
        public const string CSS2_FONT_STRETCH = "font-stretch";
        public const string CSS2_FONT_STYLE = "font-style";
        public const string CSS2_FONT_VARIANT = "font-variant";
        public const string CSS2_FONT_WEIGHT = "font-weight";
        public const string CSS2_HEIGHT = "height";
        public const string CSS2_LEFT = "left";
        public const string CSS2_LETTER_SPACING = "letter-spacing";
        public const string CSS2_LINE_HEIGHT = "line-height";
        public const string CSS2_LIST_STYLE = "list-style";
        public const string CSS2_LIST_STYLE_IMAGE = "list-style-image";
        public const string CSS2_LIST_STYLE_POSITION = "list-style-position";
        public const string CSS2_LIST_STYLE_TYPE = "list-style-type";
        public const string CSS2_MARGIN = "margin";
        public const string CSS2_MARGIN_TOP = "margin-top";
        public const string CSS2_MARGIN_RIGHT = "margin-right";
        public const string CSS2_MARGIN_BOTTOM = "margin-bottom";
        public const string CSS2_MARGIN_LEFT = "margin-left";
        public const string CSS2_MARKER_OFFSET = "marker-offset";
        public const string CSS2_MARKS = "marks";
        public const string CSS2_MAX_HEIGHT = "max-height";
        public const string CSS2_MAX_WIDTH = "max-width";
        public const string CSS2_MIN_HEIGHT = "min-height";
        public const string CSS2_MIN_WIDTH = "min-width";
        public const string CSS2_ORPHANS = "orphans";
        public const string CSS2_OUTLINE = "outline";
        public const string CSS2_OUTLINE_COLOR = "outline-color";
        public const string CSS2_OUTLINE_STYLE = "outline-style";
        public const string CSS2_OUTLINE_WIDTH = "outline-width";
        public const string CSS2_OVERFLOW = "overflow";
        public const string CSS2_OVERFLOW_X = "overflow-x";
        public const string CSS2_OVERFLOW_Y = "overflow-y";
        public const string CSS2_PADDING = "padding";
        public const string CSS2_PADDING_TOP = "padding-top";
        public const string CSS2_PADDING_RIGHT = "padding-right";
        public const string CSS2_PADDING_BOTTOM = "padding-bottom";
        public const string CSS2_PADDING_LEFT = "padding-left";
        public const string CSS2_PAGE = "page";
        public const string CSS2_PAGE_BREAK_AFTER = "page-break-after";
        public const string CSS2_PAGE_BREAK_BEFORE = "page-break-before";
        public const string CSS2_PAGE_BREAK_INSIDE = "page-break-inside";
        public const string CSS2_PAUSE = "pause";
        public const string CSS2_PAUSE_AFTER = "pause-after";
        public const string CSS2_PAUSE_BEFORE = "pause-before";
        public const string CSS2_PITCH = "pitch";
        public const string CSS2_PITCH_RANGE = "pitch-range";
        public const string CSS2_PLAY_DURING = "play-during";
        public const string CSS2_POSITION = "position";
        public const string CSS2_QUOTES = "quotes";
        public const string CSS2_RICHNESS = "richness";
        public const string CSS2_RIGHT = "right";
        public const string CSS2_SIZE = "size";
        public const string CSS2_SPEAK = "speak";
        public const string CSS2_SPEAK_HEADER = "speak-header";
        public const string CSS2_SPEAK_NUMERAL = "speak-numeral";
        public const string CSS2_SPEAK_PUNCTUATION = "speak-punctuation";
        public const string CSS2_SPEECH_RATE = "speech-rate";
        public const string CSS2_STRESS = "stress";
        public const string CSS2_TABLE_LAYOUT = "table-layout";
        public const string CSS2_TEXT_ALIGN = "text-align";
        public const string CSS2_TEXT_DECORATION = "text-decoration";
        public const string CSS2_TEXT_INDENT = "text-indent";
        public const string CSS2_TEXT_SHADOW = "text-shadow";
        public const string CSS2_TEXT_TRANSFORM = "text-transform";
        public const string CSS2_TOP = "top";
        public const string CSS2_UNICODE_BIDI = "unicode-bidi";
        public const string CSS2_VERTICAL_ALIGN = "vertical-align";
        public const string CSS2_VISIBILITY = "visibility";
        public const string CSS2_VOICE_FAMILY = "voice-family";
        public const string CSS2_VOLUME = "volume";
        public const string CSS2_WHITE_SPACE = "white-space";
        public const string CSS2_WIDOWS = "widows";
        public const string CSS2_WIDTH = "width";
        public const string CSS2_WORD_SPACING = "word-spacing";
        public const string CSS2_Z_INDEX = "z-index";

        #endregion

        #region Constructors

        internal CSS2Properties()
        {
            _Values = new Dictionary<int, int>();
        }

        #endregion

        #region Properties

        internal Dictionary<int, int> _Values;

        #endregion

        #region Methods

        public string getStyleProperty(string name)
        {
            StringLookup key = new StringLookup(name);

            if (_Values.ContainsKey(key.StringIndex))
            {
                return StringLookup.Get(_Values[key.StringIndex]);
            }
            return "";
        }

        public void setStyleProperty(string name, string value)
        {
            StringLookup key = new StringLookup(name);
            StringLookup val = new StringLookup(value);

            if (value.Length == 0)
            {
                if (_Values.ContainsKey(key.StringIndex))
                    _Values.Remove(key.StringIndex);
            }
            else
            {
                _Values[key.StringIndex] = val.StringIndex;
            }
        }

        #endregion

        #region DOM Level 2 Style

        //  Auto-Generated by Perl

        public string azimuth // azimuth
        {
            get { return getStyleProperty(CSS2_AZIMUTH); }
            set { setStyleProperty(CSS2_AZIMUTH, value); }
        }

        public string background // background
        {
            get { return getStyleProperty(CSS2_BACKGROUND); }
            set { setStyleProperty(CSS2_BACKGROUND, value); }
        }

        public string backgroundAttachment // background-attachment
        {
            get { return getStyleProperty(CSS2_BACKGROUND_ATTACHMENT); }
            set { setStyleProperty(CSS2_BACKGROUND_ATTACHMENT, value); }
        }

        public string backgroundColor // background-color
        {
            get { return getStyleProperty(CSS2_BACKGROUND_COLOR); }
            set { setStyleProperty(CSS2_BACKGROUND_COLOR, value); }
        }

        public string backgroundImage // background-image
        {
            get { return getStyleProperty(CSS2_BACKGROUND_IMAGE); }
            set { setStyleProperty(CSS2_BACKGROUND_IMAGE, value); }
        }

        public string backgroundPosition // background-position
        {
            get { return getStyleProperty(CSS2_BACKGROUND_POSITION); }
            set { setStyleProperty(CSS2_BACKGROUND_POSITION, value); }
        }

        public string backgroundRepeat // background-repeat
        {
            get { return getStyleProperty(CSS2_BACKGROUND_REPEAT); }
            set { setStyleProperty(CSS2_BACKGROUND_REPEAT, value); }
        }

        public string border // border
        {
            get { return getStyleProperty(CSS2_BORDER); }
            set { setStyleProperty(CSS2_BORDER, value); }
        }

        public string borderCollapse // border-collapse
        {
            get { return getStyleProperty(CSS2_BORDER_COLLAPSE); }
            set { setStyleProperty(CSS2_BORDER_COLLAPSE, value); }
        }

        public string borderColor // border-color
        {
            get { return getStyleProperty(CSS2_BORDER_COLOR); }
            set { setStyleProperty(CSS2_BORDER_COLOR, value); }
        }

        public string borderSpacing // border-spacing
        {
            get { return getStyleProperty(CSS2_BORDER_SPACING); }
            set { setStyleProperty(CSS2_BORDER_SPACING, value); }
        }

        public string borderStyle // border-style
        {
            get { return getStyleProperty(CSS2_BORDER_STYLE); }
            set { setStyleProperty(CSS2_BORDER_STYLE, value); }
        }

        public string borderTop // border-top
        {
            get { return getStyleProperty(CSS2_BORDER_TOP); }
            set { setStyleProperty(CSS2_BORDER_TOP, value); }
        }

        public string borderRight // border-right
        {
            get { return getStyleProperty(CSS2_BORDER_RIGHT); }
            set { setStyleProperty(CSS2_BORDER_RIGHT, value); }
        }

        public string borderBottom // border-bottom
        {
            get { return getStyleProperty(CSS2_BORDER_BOTTOM); }
            set { setStyleProperty(CSS2_BORDER_BOTTOM, value); }
        }

        public string borderLeft // border-left
        {
            get { return getStyleProperty(CSS2_BORDER_LEFT); }
            set { setStyleProperty(CSS2_BORDER_LEFT, value); }
        }

        public string borderTopColor // border-top-color
        {
            get { return getStyleProperty(CSS2_BORDER_TOP_COLOR); }
            set { setStyleProperty(CSS2_BORDER_TOP_COLOR, value); }
        }

        public string borderRightColor // border-right-color
        {
            get { return getStyleProperty(CSS2_BORDER_RIGHT_COLOR); }
            set { setStyleProperty(CSS2_BORDER_RIGHT_COLOR, value); }
        }

        public string borderBottomColor // border-bottom-color
        {
            get { return getStyleProperty(CSS2_BORDER_BOTTOM_COLOR); }
            set { setStyleProperty(CSS2_BORDER_BOTTOM_COLOR, value); }
        }

        public string borderLeftColor // border-left-color
        {
            get { return getStyleProperty(CSS2_BORDER_LEFT_COLOR); }
            set { setStyleProperty(CSS2_BORDER_LEFT_COLOR, value); }
        }

        public string borderTopStyle // border-top-style
        {
            get { return getStyleProperty(CSS2_BORDER_TOP_STYLE); }
            set { setStyleProperty(CSS2_BORDER_TOP_STYLE, value); }
        }

        public string borderRightStyle // border-right-style
        {
            get { return getStyleProperty(CSS2_BORDER_RIGHT_STYLE); }
            set { setStyleProperty(CSS2_BORDER_RIGHT_STYLE, value); }
        }

        public string borderBottomStyle // border-bottom-style
        {
            get { return getStyleProperty(CSS2_BORDER_BOTTOM_STYLE); }
            set { setStyleProperty(CSS2_BORDER_BOTTOM_STYLE, value); }
        }

        public string borderLeftStyle // border-left-style
        {
            get { return getStyleProperty(CSS2_BORDER_LEFT_STYLE); }
            set { setStyleProperty(CSS2_BORDER_LEFT_STYLE, value); }
        }

        public string borderTopWidth // border-top-width
        {
            get { return getStyleProperty(CSS2_BORDER_TOP_WIDTH); }
            set { setStyleProperty(CSS2_BORDER_TOP_WIDTH, value); }
        }

        public string borderRightWidth // border-right-width
        {
            get { return getStyleProperty(CSS2_BORDER_RIGHT_WIDTH); }
            set { setStyleProperty(CSS2_BORDER_RIGHT_WIDTH, value); }
        }

        public string borderBottomWidth // border-bottom-width
        {
            get { return getStyleProperty(CSS2_BORDER_BOTTOM_WIDTH); }
            set { setStyleProperty(CSS2_BORDER_BOTTOM_WIDTH, value); }
        }

        public string borderLeftWidth // border-left-width
        {
            get { return getStyleProperty(CSS2_BORDER_LEFT_WIDTH); }
            set { setStyleProperty(CSS2_BORDER_LEFT_WIDTH, value); }
        }

        public string borderWidth // border-width
        {
            get { return getStyleProperty(CSS2_BORDER_WIDTH); }
            set { setStyleProperty(CSS2_BORDER_WIDTH, value); }
        }

        public string bottom // bottom
        {
            get { return getStyleProperty(CSS2_BOTTOM); }
            set { setStyleProperty(CSS2_BOTTOM, value); }
        }

        public string captionSide // caption-side
        {
            get { return getStyleProperty(CSS2_CAPTION_SIDE); }
            set { setStyleProperty(CSS2_CAPTION_SIDE, value); }
        }

        public string clear // clear
        {
            get { return getStyleProperty(CSS2_CLEAR); }
            set { setStyleProperty(CSS2_CLEAR, value); }
        }

        public string clip // clip
        {
            get { return getStyleProperty(CSS2_CLIP); }
            set { setStyleProperty(CSS2_CLIP, value); }
        }

        public string color // color
        {
            get { return getStyleProperty(CSS2_COLOR); }
            set { setStyleProperty(CSS2_COLOR, value); }
        }

        public string content // content
        {
            get { return getStyleProperty(CSS2_CONTENT); }
            set { setStyleProperty(CSS2_CONTENT, value); }
        }

        public string counterIncrement // counter-increment
        {
            get { return getStyleProperty(CSS2_COUNTER_INCREMENT); }
            set { setStyleProperty(CSS2_COUNTER_INCREMENT, value); }
        }

        public string counterReset // counter-reset
        {
            get { return getStyleProperty(CSS2_COUNTER_RESET); }
            set { setStyleProperty(CSS2_COUNTER_RESET, value); }
        }

        public string cue // cue
        {
            get { return getStyleProperty(CSS2_CUE); }
            set { setStyleProperty(CSS2_CUE, value); }
        }

        public string cueAfter // cue-after
        {
            get { return getStyleProperty(CSS2_CUE_AFTER); }
            set { setStyleProperty(CSS2_CUE_AFTER, value); }
        }

        public string cueBefore // cue-before
        {
            get { return getStyleProperty(CSS2_CUE_BEFORE); }
            set { setStyleProperty(CSS2_CUE_BEFORE, value); }
        }

        public string cursor // cursor
        {
            get { return getStyleProperty(CSS2_CURSOR); }
            set { setStyleProperty(CSS2_CURSOR, value); }
        }

        public string direction // direction
        {
            get { return getStyleProperty(CSS2_DIRECTION); }
            set { setStyleProperty(CSS2_DIRECTION, value); }
        }

        public string display // display
        {
            get { return getStyleProperty(CSS2_DISPLAY); }
            set { setStyleProperty(CSS2_DISPLAY, value); }
        }

        public string elevation // elevation
        {
            get { return getStyleProperty(CSS2_ELEVATION); }
            set { setStyleProperty(CSS2_ELEVATION, value); }
        }

        public string emptyCells // empty-cells
        {
            get { return getStyleProperty(CSS2_EMPTY_CELLS); }
            set { setStyleProperty(CSS2_EMPTY_CELLS, value); }
        }

        public string cssFloat // css-float
        {
            get { return getStyleProperty(CSS2_CSS_FLOAT); }
            set { setStyleProperty(CSS2_CSS_FLOAT, value); }
        }

        public string font // font
        {
            get { return getStyleProperty(CSS2_FONT); }
            set { setStyleProperty(CSS2_FONT, value); }
        }

        public string fontFamily // font-family
        {
            get { return getStyleProperty(CSS2_FONT_FAMILY); }
            set { setStyleProperty(CSS2_FONT_FAMILY, value); }
        }

        public string fontSize // font-size
        {
            get { return getStyleProperty(CSS2_FONT_SIZE); }
            set { setStyleProperty(CSS2_FONT_SIZE, value); }
        }

        public string fontSizeAdjust // font-size-adjust
        {
            get { return getStyleProperty(CSS2_FONT_SIZE_ADJUST); }
            set { setStyleProperty(CSS2_FONT_SIZE_ADJUST, value); }
        }

        public string fontStretch // font-stretch
        {
            get { return getStyleProperty(CSS2_FONT_STRETCH); }
            set { setStyleProperty(CSS2_FONT_STRETCH, value); }
        }

        public string fontStyle // font-style
        {
            get { return getStyleProperty(CSS2_FONT_STYLE); }
            set { setStyleProperty(CSS2_FONT_STYLE, value); }
        }

        public string fontVariant // font-variant
        {
            get { return getStyleProperty(CSS2_FONT_VARIANT); }
            set { setStyleProperty(CSS2_FONT_VARIANT, value); }
        }

        public string fontWeight // font-weight
        {
            get { return getStyleProperty(CSS2_FONT_WEIGHT); }
            set { setStyleProperty(CSS2_FONT_WEIGHT, value); }
        }

        public string height // height
        {
            get { return getStyleProperty(CSS2_HEIGHT); }
            set { setStyleProperty(CSS2_HEIGHT, value); }
        }

        public string left // left
        {
            get { return getStyleProperty(CSS2_LEFT); }
            set { setStyleProperty(CSS2_LEFT, value); }
        }

        public string letterSpacing // letter-spacing
        {
            get { return getStyleProperty(CSS2_LETTER_SPACING); }
            set { setStyleProperty(CSS2_LETTER_SPACING, value); }
        }

        public string lineHeight // line-height
        {
            get { return getStyleProperty(CSS2_LINE_HEIGHT); }
            set { setStyleProperty(CSS2_LINE_HEIGHT, value); }
        }

        public string listStyle // list-style
        {
            get { return getStyleProperty(CSS2_LIST_STYLE); }
            set { setStyleProperty(CSS2_LIST_STYLE, value); }
        }

        public string listStyleImage // list-style-image
        {
            get { return getStyleProperty(CSS2_LIST_STYLE_IMAGE); }
            set { setStyleProperty(CSS2_LIST_STYLE_IMAGE, value); }
        }

        public string listStylePosition // list-style-position
        {
            get { return getStyleProperty(CSS2_LIST_STYLE_POSITION); }
            set { setStyleProperty(CSS2_LIST_STYLE_POSITION, value); }
        }

        public string listStyleType // list-style-type
        {
            get { return getStyleProperty(CSS2_LIST_STYLE_TYPE); }
            set { setStyleProperty(CSS2_LIST_STYLE_TYPE, value); }
        }

        public string margin // margin
        {
            get { return getStyleProperty(CSS2_MARGIN); }
            set { setStyleProperty(CSS2_MARGIN, value); }
        }

        public string marginTop // margin-top
        {
            get { return getStyleProperty(CSS2_MARGIN_TOP); }
            set { setStyleProperty(CSS2_MARGIN_TOP, value); }
        }

        public string marginRight // margin-right
        {
            get { return getStyleProperty(CSS2_MARGIN_RIGHT); }
            set { setStyleProperty(CSS2_MARGIN_RIGHT, value); }
        }

        public string marginBottom // margin-bottom
        {
            get { return getStyleProperty(CSS2_MARGIN_BOTTOM); }
            set { setStyleProperty(CSS2_MARGIN_BOTTOM, value); }
        }

        public string marginLeft // margin-left
        {
            get { return getStyleProperty(CSS2_MARGIN_LEFT); }
            set { setStyleProperty(CSS2_MARGIN_LEFT, value); }
        }

        public string markerOffset // marker-offset
        {
            get { return getStyleProperty(CSS2_MARKER_OFFSET); }
            set { setStyleProperty(CSS2_MARKER_OFFSET, value); }
        }

        public string marks // marks
        {
            get { return getStyleProperty(CSS2_MARKS); }
            set { setStyleProperty(CSS2_MARKS, value); }
        }

        public string maxHeight // max-height
        {
            get { return getStyleProperty(CSS2_MAX_HEIGHT); }
            set { setStyleProperty(CSS2_MAX_HEIGHT, value); }
        }

        public string maxWidth // max-width
        {
            get { return getStyleProperty(CSS2_MAX_WIDTH); }
            set { setStyleProperty(CSS2_MAX_WIDTH, value); }
        }

        public string minHeight // min-height
        {
            get { return getStyleProperty(CSS2_MIN_HEIGHT); }
            set { setStyleProperty(CSS2_MIN_HEIGHT, value); }
        }

        public string minWidth // min-width
        {
            get { return getStyleProperty(CSS2_MIN_WIDTH); }
            set { setStyleProperty(CSS2_MIN_WIDTH, value); }
        }

        public string overflowX
        {
            get { return getStyleProperty(CSS2_OVERFLOW_X); }
            set { setStyleProperty(CSS2_OVERFLOW_X, value); }
        }

        public string overflowY
        {
            get { return getStyleProperty(CSS2_OVERFLOW_Y); }
            set { setStyleProperty(CSS2_OVERFLOW_Y, value); }
        }

        public string orphans // orphans
        {
            get { return getStyleProperty(CSS2_ORPHANS); }
            set { setStyleProperty(CSS2_ORPHANS, value); }
        }

        public string outline // outline
        {
            get { return getStyleProperty(CSS2_OUTLINE); }
            set { setStyleProperty(CSS2_OUTLINE, value); }
        }

        public string outlineColor // outline-color
        {
            get { return getStyleProperty(CSS2_OUTLINE_COLOR); }
            set { setStyleProperty(CSS2_OUTLINE_COLOR, value); }
        }

        public string outlineStyle // outline-style
        {
            get { return getStyleProperty(CSS2_OUTLINE_STYLE); }
            set { setStyleProperty(CSS2_OUTLINE_STYLE, value); }
        }

        public string outlineWidth // outline-width
        {
            get { return getStyleProperty(CSS2_OUTLINE_WIDTH); }
            set { setStyleProperty(CSS2_OUTLINE_WIDTH, value); }
        }

        public string overflow // overflow
        {
            get { return getStyleProperty(CSS2_OVERFLOW); }
            set { setStyleProperty(CSS2_OVERFLOW, value); }
        }

        public string padding // padding
        {
            get { return getStyleProperty(CSS2_PADDING); }
            set { setStyleProperty(CSS2_PADDING, value); }
        }

        public string paddingTop // padding-top
        {
            get { return getStyleProperty(CSS2_PADDING_TOP); }
            set { setStyleProperty(CSS2_PADDING_TOP, value); }
        }

        public string paddingRight // padding-right
        {
            get { return getStyleProperty(CSS2_PADDING_RIGHT); }
            set { setStyleProperty(CSS2_PADDING_RIGHT, value); }
        }

        public string paddingBottom // padding-bottom
        {
            get { return getStyleProperty(CSS2_PADDING_BOTTOM); }
            set { setStyleProperty(CSS2_PADDING_BOTTOM, value); }
        }

        public string paddingLeft // padding-left
        {
            get { return getStyleProperty(CSS2_PADDING_LEFT); }
            set { setStyleProperty(CSS2_PADDING_LEFT, value); }
        }

        public string page // page
        {
            get { return getStyleProperty(CSS2_PAGE); }
            set { setStyleProperty(CSS2_PAGE, value); }
        }

        public string pageBreakAfter // page-break-after
        {
            get { return getStyleProperty(CSS2_PAGE_BREAK_AFTER); }
            set { setStyleProperty(CSS2_PAGE_BREAK_AFTER, value); }
        }

        public string pageBreakBefore // page-break-before
        {
            get { return getStyleProperty(CSS2_PAGE_BREAK_BEFORE); }
            set { setStyleProperty(CSS2_PAGE_BREAK_BEFORE, value); }
        }

        public string pageBreakInside // page-break-inside
        {
            get { return getStyleProperty(CSS2_PAGE_BREAK_INSIDE); }
            set { setStyleProperty(CSS2_PAGE_BREAK_INSIDE, value); }
        }

        public string pause // pause
        {
            get { return getStyleProperty(CSS2_PAUSE); }
            set { setStyleProperty(CSS2_PAUSE, value); }
        }

        public string pauseAfter // pause-after
        {
            get { return getStyleProperty(CSS2_PAUSE_AFTER); }
            set { setStyleProperty(CSS2_PAUSE_AFTER, value); }
        }

        public string pauseBefore // pause-before
        {
            get { return getStyleProperty(CSS2_PAUSE_BEFORE); }
            set { setStyleProperty(CSS2_PAUSE_BEFORE, value); }
        }

        public string pitch // pitch
        {
            get { return getStyleProperty(CSS2_PITCH); }
            set { setStyleProperty(CSS2_PITCH, value); }
        }

        public string pitchRange // pitch-range
        {
            get { return getStyleProperty(CSS2_PITCH_RANGE); }
            set { setStyleProperty(CSS2_PITCH_RANGE, value); }
        }

        public string playDuring // play-during
        {
            get { return getStyleProperty(CSS2_PLAY_DURING); }
            set { setStyleProperty(CSS2_PLAY_DURING, value); }
        }

        public string position // position
        {
            get { return getStyleProperty(CSS2_POSITION); }
            set { setStyleProperty(CSS2_POSITION, value); }
        }

        public string quotes // quotes
        {
            get { return getStyleProperty(CSS2_QUOTES); }
            set { setStyleProperty(CSS2_QUOTES, value); }
        }

        public string richness // richness
        {
            get { return getStyleProperty(CSS2_RICHNESS); }
            set { setStyleProperty(CSS2_RICHNESS, value); }
        }

        public string right // right
        {
            get { return getStyleProperty(CSS2_RIGHT); }
            set { setStyleProperty(CSS2_RIGHT, value); }
        }

        public string size // size
        {
            get { return getStyleProperty(CSS2_SIZE); }
            set { setStyleProperty(CSS2_SIZE, value); }
        }

        public string speak // speak
        {
            get { return getStyleProperty(CSS2_SPEAK); }
            set { setStyleProperty(CSS2_SPEAK, value); }
        }

        public string speakHeader // speak-header
        {
            get { return getStyleProperty(CSS2_SPEAK_HEADER); }
            set { setStyleProperty(CSS2_SPEAK_HEADER, value); }
        }

        public string speakNumeral // speak-numeral
        {
            get { return getStyleProperty(CSS2_SPEAK_NUMERAL); }
            set { setStyleProperty(CSS2_SPEAK_NUMERAL, value); }
        }

        public string speakPunctuation // speak-punctuation
        {
            get { return getStyleProperty(CSS2_SPEAK_PUNCTUATION); }
            set { setStyleProperty(CSS2_SPEAK_PUNCTUATION, value); }
        }

        public string speechRate // speech-rate
        {
            get { return getStyleProperty(CSS2_SPEECH_RATE); }
            set { setStyleProperty(CSS2_SPEECH_RATE, value); }
        }

        public string stress // stress
        {
            get { return getStyleProperty(CSS2_STRESS); }
            set { setStyleProperty(CSS2_STRESS, value); }
        }

        public string tableLayout // table-layout
        {
            get { return getStyleProperty(CSS2_TABLE_LAYOUT); }
            set { setStyleProperty(CSS2_TABLE_LAYOUT, value); }
        }

        public string textAlign // text-align
        {
            get { return getStyleProperty(CSS2_TEXT_ALIGN); }
            set { setStyleProperty(CSS2_TEXT_ALIGN, value); }
        }

        public string textDecoration // text-decoration
        {
            get { return getStyleProperty(CSS2_TEXT_DECORATION); }
            set { setStyleProperty(CSS2_TEXT_DECORATION, value); }
        }

        public string textIndent // text-indent
        {
            get { return getStyleProperty(CSS2_TEXT_INDENT); }
            set { setStyleProperty(CSS2_TEXT_INDENT, value); }
        }

        public string textShadow // text-shadow
        {
            get { return getStyleProperty(CSS2_TEXT_SHADOW); }
            set { setStyleProperty(CSS2_TEXT_SHADOW, value); }
        }

        public string textTransform // text-transform
        {
            get { return getStyleProperty(CSS2_TEXT_TRANSFORM); }
            set { setStyleProperty(CSS2_TEXT_TRANSFORM, value); }
        }

        public string top // top
        {
            get { return getStyleProperty(CSS2_TOP); }
            set { setStyleProperty(CSS2_TOP, value); }
        }

        public string unicodeBidi // unicode-bidi
        {
            get { return getStyleProperty(CSS2_UNICODE_BIDI); }
            set { setStyleProperty(CSS2_UNICODE_BIDI, value); }
        }

        public string verticalAlign // vertical-align
        {
            get { return getStyleProperty(CSS2_VERTICAL_ALIGN); }
            set { setStyleProperty(CSS2_VERTICAL_ALIGN, value); }
        }

        public string visibility // visibility
        {
            get { return getStyleProperty(CSS2_VISIBILITY); }
            set
            {
                setStyleProperty(CSS2_VISIBILITY, value);
            }
        }

        public string voiceFamily // voice-family
        {
            get { return getStyleProperty(CSS2_VOICE_FAMILY); }
            set { setStyleProperty(CSS2_VOICE_FAMILY, value); }
        }

        public string volume // volume
        {
            get { return getStyleProperty(CSS2_VOLUME); }
            set { setStyleProperty(CSS2_VOLUME, value); }
        }

        public string whiteSpace // white-space
        {
            get { return getStyleProperty(CSS2_WHITE_SPACE); }
            set { setStyleProperty(CSS2_WHITE_SPACE, value); }
        }

        public string widows // widows
        {
            get { return getStyleProperty(CSS2_WIDOWS); }
            set { setStyleProperty(CSS2_WIDOWS, value); }
        }

        public string width // width
        {
            get { return getStyleProperty(CSS2_WIDTH); }
            set { setStyleProperty(CSS2_WIDTH, value); }
        }

        public string wordSpacing // word-spacing
        {
            get { return getStyleProperty(CSS2_WORD_SPACING); }
            set { setStyleProperty(CSS2_WORD_SPACING, value); }
        }

        public string zIndex // z-index
        {
            get { return getStyleProperty(CSS2_Z_INDEX); }
            set { setStyleProperty(CSS2_Z_INDEX, value); }
        }

        #endregion
    }
}
